package com.xsmart.oa.api.mall.mymenu;

import com.xsmart.common.entity.RequestBean;
import com.xsmart.oa.services.mall.mymenu.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/api")
public class UserLoginController {
    @Autowired
    UserLoginService userLoginService;

    @RequestMapping(value = "/v1/UserLoginService/login", method = RequestMethod.POST)
    @ResponseBody
    public Object login(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return userLoginService.login(requestBean);
    }
}
